package java925;

import java.util.Arrays;

//7、int[] arr11 = {1, 2, 3, 4,5,6,7,8,9,0,3,2,4,5,6,7,4,32,2,1,1,4,6,3}; 数组去重
public class Test7 {
    public static void main(String[] args) {
        int[] arry = {1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 3, 2, 4, 5, 6, 7, 4, 32, 2, 1, 1, 4, 6, 3};
        int t = 0;
        int[] newArry = new int[arry.length];
        for (int i = 0; i < arry.length; i++) {
            boolean isTrue = true;
            for (int j = i + 1; j < arry.length; j++) {
                if (arry[i] == arry[j]) {
                    isTrue = false;
                    break;
                }
            }
            if (isTrue) {
                newArry[t] = arry[i];
                t++;
            }
        }
        int[] copy = Arrays.copyOf(newArry, t);
        System.out.println(Arrays.toString(copy));
    }
}